USE [RestaurantManagement]
GO

/****** Object:  Table [dbo].[RestaurantMenuCategory]    Script Date: 04/28/2013 21:14:25 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[RestaurantMenuCategory](
	[MenuCategoryID] [uniqueidentifier] NOT NULL,
	[MenuCategoryCode] [varchar](20) NULL,
	[IsParent] [bit] NULL,
	[ParentID] [uniqueidentifier] NULL,
	[MenuCategoryName] [nvarchar](255) NULL,
	[Description] [nvarchar](255) NULL,
	[IsActive] [bit] NULL,
	[RestaurantID] [uniqueidentifier] NULL,
 CONSTRAINT [PK_RestaurantMenuCategory] PRIMARY KEY CLUSTERED 
(
	[MenuCategoryID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[RestaurantMenuCategory]  WITH CHECK ADD  CONSTRAINT [FK_RestaurantMenuCategory_Restaurants] FOREIGN KEY([RestaurantID])
REFERENCES [dbo].[Restaurant] ([RestaurantID])
GO

ALTER TABLE [dbo].[RestaurantMenuCategory] CHECK CONSTRAINT [FK_RestaurantMenuCategory_Restaurants]
GO

ALTER TABLE [dbo].[RestaurantMenuCategory] ADD  CONSTRAINT [DF_RestaurantMenuCategory_MenuCategoryID]  DEFAULT (newid()) FOR [MenuCategoryID]
GO


